package com.itheima.tlias84.mapper;

import com.itheima.tlias84.dto.ReportLogDTO;
import com.itheima.tlias84.po.ReportLogParam;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
@SuppressWarnings("all")
@Mapper
public  interface LogMapper {

    //插入更新日志
    @Insert("INSERT INTO log(operate_empId, operate_emp_name , operate_time, class_name, " +
            "method_name, method_params, cost_time,return_value) " +
            "VALUES (#{l.operateEmpId}, #{l.operateEmpName}, #{l.operateTime}, #{l.className}, " +
            "#{l.methodName}, #{l.methodParams}, #{l.costTime},#{l.returnValue})")
      int insertLog(@Param("l") ReportLogDTO reportLogDTO);

    //分页查询
    List<ReportLogDTO> selectLogs(@Param("p")ReportLogParam reportLogParam);

}
